﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Main.master" AutoEventWireup="true" CodeFile="advertView.aspx.cs" Inherits="advert_advertView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headcss" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<table align="center" border="1" width="80%">
    <tr>
        <td>
            <table border="1">
                <tr>
                    <td>
                        广告图片：<img src='<%=advertise.viewAdvertPath%>' alt='' />
                    </td>
                </tr>            
                <tr>
                    <td>
                        广告名称：<%=advertise.AdvertName %>
                    </td>
                </tr>
                <tr>
                    <td>
                        当前状态：<%=AdvertStatusString(advertise.Status)%>
                    </td>
                </tr>   
                <tr>
                    <td>
                        有效时间：<%=advertise.BeginTime %> 至 <%=advertise.EndTime %>
                    </td>
                </tr>                                 
                <tr>
                    <td>
                        广告URL：<a href="<%=advertise.Url %>" target="_blank" ><%=advertise.Url %></a>
                    </td>
                </tr>                
                <tr>
                    <td>
                        所在位置：<%=advertise.SpaceName %>
                    </td>
                </tr>
                <tr>
                    <td>
                        客户信息：盖世汽车网
                    </td>
                </tr>
                <tr>
                    <td>
                        广告描述：<%=advertise.Description %>
                    </td>
                </tr>
                <tr>
                    <td>
                        发布时间：<%=advertise.CreateDate %>
                    </td>
                </tr>
                <tr>
                    <td>
                        发布人：<%=advertise.CreateUser %>
                    </td>
                </tr>                
                <tr>
                    <td>
                        点击次数：<div class="clickview" id="<%=advertise.ID%>">loading...</div>
                    </td>
                </tr>            
            </table>
        </td>
    </tr>
</table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="footer" Runat="Server">
<script type="text/javascript">
    $(document).ready(function () {
        var dom = $(".clickview");
        var id = dom.attr("id");
        $.ajax({
            type: "post",
            url: "ClickViewHandler.ashx",
            data: "ID=" + id,
            success: function (msg) {
                dom.html(msg);
            },
            error: function (e) {
                $("#" + id).html("读取错误");
            }
        });
    });
</script>
</asp:Content>

